home *** CD-ROM | disk | FTP | other *** search
- #pragma interface
- #ifndef POPEN_H
- #define POPEN_H
-
- class POPEN{
- int pid;
- int status;
- struct {
- int out;
- int err;
- }fds;
- SSTRING outbuf;
- SSTRING errbuf;
- /*~PROTOBEG~ POPEN */
- public:
- POPEN (const char *command);
- int getstatus (void);
- int isok (void);
- int readerr (char *line, int size);
- private:
- void readif (struct fd_set *in, int fd, SSTRING&buf);
- int readline (char *line, int size, SSTRING&buf);
- public:
- int readout (char *line, int size);
- int wait (int timeout);
- private:
- void waitend (void);
- public:
- ~POPEN (void);
- /*~PROTOEND~ POPEN */
- };
-
-
- #endif
-
-